#pragma config(Hubs,  S1, HTMotor,  HTServo,  none,     none)
#pragma config(Sensor, S1,     ,               sensorI2CMuxController)
#pragma config(Motor,  mtr_S1_C1_1,     left,          tmotorTetrix, openLoop, reversed, encoder)
#pragma config(Motor,  mtr_S1_C1_2,     right,         tmotorTetrix, openLoop, encoder)
#pragma config(Servo,  srvo_S1_C2_1,    aux,                  tServoStandard)
#pragma config(Servo,  srvo_S1_C2_2,    servo2,               tServoNone)
#pragma config(Servo,  srvo_S1_C2_3,    servo3,               tServoNone)
#pragma config(Servo,  srvo_S1_C2_4,    servo4,               tServoNone)
#pragma config(Servo,  srvo_S1_C2_5,    servo5,               tServoNone)
#pragma config(Servo,  srvo_S1_C2_6,    servo6,               tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include "joystickdriver.c"

task main()
{

	while(1 == 1)
	{
		getJoystickSettings(joystick);

		if(joystick.joy1_y1 < 10 || joystick.joy1_y1 > -10)
		{
			motor[left] = 0;
		}
		if(joystick.joy1_y1 > 10 || joystick.joy1_y1 < -10)
		{
			motor[left] = joystick.joy1_y1/1.5;
		}
		if(joystick.joy1_y2 < 10 || joystick.joy1_y2 > -10)
		{
			motor[right] = 0;
		}
		if(joystick.joy1_y2 > 10 || joystick.joy1_y2 < -10)
		{
			motor[right] = joystick.joy1_y2/1.5;
		}


	}




}
